package io.print;

import org.junit.Test;

import java.io.*;
import java.util.Properties;

/**
 * @author mubei
 * @date 2021/12/4
 * @description
 */
public class Print_ {

    @Test()
    public void test1() throws Exception {
        // 标准输出流  默认输出到显示器
        PrintStream out = System.out;
        out.println("hello");
        out.close();

        System.setOut(new PrintStream("指定位置"));
        PrintWriter printWriter = new PrintWriter(new FileOutputStream("指定位置"));

    }
}
